home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / utilities / disk / dskspr20.lha / diskspareii / DOC < prev    next >
Encoding:
Text File  |  1994-05-02  |  10.6 KB  |  282 lines

  1.                  DiskSpareDevice 2.0
  2.  
  3.                 written and (c) 1992,93,94
  4.                   by Klaus Deppisch
  5.                  All rights reserved
  6.  
  7.  What is diskspare.device:
  8.  
  9.     It is a completion or replacement of the trackdisk.device,
  10.     which lets you format your disks with 960 kB or 984 kB, or if
  11.     you've got a (trackdisk-compatible!) HD-Drive with 1920 kB
  12.     or 1968 kB !!!
  13.     
  14.  How could this be:
  15.     
  16.     I've changed the track-construction a little bit. In detail I
  17.     left out the (unused) sector-headers and read/write some 
  18.     bytes more than the trackdisk.device.
  19.     The result: I can read/write 12 sectors/track (HD: 24)!
  20.     
  21.     By the way, ALL the drives I tested were able to read/write
  22.     more than 12 sectors (at least 12.4 sectors but unfortunately
  23.     no 25 sectors in HD-Mode).
  24.     -> There should be no problems.
  25.     
  26.     The device is able to read/write 12*160*512 = 983040 Bytes.
  27.     Or (new for v1.6) 12*164*512 = 1007616 Bytes (984K)
  28.     Or (new for v2.0) 24*160*512 = 1966080 Bytes (1920K)
  29.     or          24*164*512 = 2015232 Bytes (1968K)
  30.  
  31.     The HD-Mode is compatible to my 'highdensity.device' which
  32.     is now dead.
  33.  
  34.     When you mount the device you can use it like any other disk
  35.     or partition. That means you can access it with your favourite
  36.     dir-util, format, diskcopy  or whatever you want to do with it.
  37.  
  38.  What do you need:
  39.  
  40.     - Kickstart 2.0 or higher    (NO WAY to get it run < KS 2.0 !)
  41.     - diskspare.device             (here it is)
  42.     - mountlist-entry        (included)
  43.     - a floppy-drive        (you should have one)
  44.     - an Amiga            (hmm..)
  45.     
  46.  What to do:
  47.  
  48.     - read this doc-file (the WHOLE crap !!!)
  49.     - copy the file 'diskspare.device' into your DEVS: directory.
  50.     - append the file 'Mountlist' to your Mountlist (to be found
  51.       in your DEVS: directory) using e.g. Ed.
  52.     - insert the lines 'mount DS0:' and 'addbuffers DS0: >NIL:'
  53.       (or DS1-3) into your 'User-Startup' (can be found in S:)
  54.     - OR if you're using WB 2.1/3.0 copy the File(s) DS0-DS3 into
  55.       your DEVS:DosDrivers directory.    
  56.     - OR use the included install sripts (new for v2.0).
  57.     - reboot your Amiga
  58.     
  59.     The line 'addbuffers DSX: >NIL:' is necessary to make the
  60.     device 'visible'. It's better to use this than to modify
  61.     the mountlist with 'Mount = 1' because then you'll get a
  62.     'no disk'-requester when mounting. (only for WB2.0) 
  63.     For Workbench 2.1 and above you can use the 'Mount = 1'.
  64.     
  65.     NOTE:
  66.     If you don't use the 'addbuffers' or 'mount = 1' the device 
  67.     won't be mounted correctly until you access it. That will
  68.     cause some programs to crash !!
  69.     
  70.     
  71.  Examples:
  72.      
  73.  1.    You've got two drives and want to use 'DF1' as 'DS1'.
  74.      You've copied the file 'diskspare.device' and appended 'Mountlist'
  75.      to your Mountlist (do *** NOT *** simply COPY it to devs: or your
  76.      personal Mountlist will be LOST !!!). 
  77.     
  78.     To test whether it works (or not) open a Shellwindow and type 
  79.     'mount DS1: <return>' then 'dir DS1: <return>'. You should 
  80.     see a requester now 'No disk present in device DS1', cancel it.
  81.     Insert a blank (or empty) disk into your drive and type:
  82.     'format drive DS1: name test noicons<return>'.
  83.     The disk should be formatted like any other disk. After format 
  84.     type 'info <return>' you should find a line like this:
  85.     'DS1:      983K      1966      2   0%   0  Read/Write test'
  86.     this means that everything works fine and you're able 
  87.     to use this disk like any other disk.
  88.     
  89.  2.    If you've only got one drive and want to use it as 'DS0'.
  90.      You've copied the file 'diskspare.device' and appended 'Mountlist'
  91.      to your Mountlist (do *** NOT *** simply COPY it to devs: or your
  92.      personal Mountlist will be LOST !!!). 
  93.     
  94.     Follow the test-procedure as above.
  95.     After 'info' you should see a line like this:
  96.     'DS0:    983K    1966     2   0%   0  Read/Write test'.
  97.  
  98.  3.    You're the proud owner of an Amiga 4000 and want to use your
  99.      internal 'DF0:' as DS0:. You only have to copy the file
  100.      'diskspare.device' to DEVS: and the Mountlist-File from the
  101.      'HD'-Drawer (!) into your 'Devs:DOSDrivers' Drawer.
  102.  
  103.  
  104.  What problems could arise ?
  105.     
  106.     - If you modify the icons for WB 2.1/3.0, check if they 
  107.       have the right unit-number (use information from the
  108.       icons-menu). (There needn't be a number in the icon.
  109.       I forgot to remove it in the first release...)
  110.     - Mount returns an error: 'Entry not found' -> check if you 
  111.       really appended the mountlist and typed the right name
  112.     - dir returns an error: 'device or directory not mounted' ->
  113.       did you copy the device to devs: or did you try to access
  114.       an invalid drive (if you've got df0: and df1: you can't
  115.       mount ds2:. It's logical, or what !!!)
  116.     - format returns: 'no disk inserted' -> you must wait a
  117.       few seconds after inserting a disk (trackdisk must access
  118.       the disk first)
  119.     - format returns: 'format failed try another disk' -> do so
  120.     - format returns always the above -> it looks like you've
  121.       got a drive that doesn't work -> try another drive or 
  122.       curse me and delete all 'diskspare-files'.
  123.  
  124.  
  125.  NOTES:
  126.  
  127.        -This is NO easy using program! That means, You should know
  128.     what you're doing.
  129.     If you don't know how to use the Shell and how to edit a mountlist
  130.     and user-startup read the manual that came with your machine!
  131.     Or ask a friend to help you.
  132.     Or use the included install scripts.    
  133.     
  134.        -If you mount the device after 'LoadWB' there will be no Icons
  135.     for unformatted disks or during format,diskcopy etc. that say 
  136.     'DSX:BAD' or 'DSX:BUSY'. 
  137.     This isn't a bug of my device but an oddity of the Workbench.
  138.     (It's the same if you mount RAD: or any other device AFTER
  139.     'LoadWB').
  140.     
  141.        -If you use the device for 984K disks NOTE that it IS a HACK! 
  142.     Normally you CAN'T read/write Cyl. 80/81 via trackdisk.device.
  143.     It's only possible due to a PATCH of a PRIVATE device.structure!
  144.     I tried to make it as safe as possible and it works fine with
  145.     KS2.0/KS3.0 but there's NO GUARANTEE that it will work with 
  146.     future releases. (Until I fix it).
  147.     
  148.        -The Autoswitch DD<->HD is only possible due to a PATCH of a PRIVATE
  149.     structure in the FFS. The second nasty hack! (I hope the last one)
  150.     It's necessary because the FFS allows only the trackdisk.device 
  151.     to change the capacity during operation. If the devicename isn't 
  152.     'trackdisk.device' it NEVER calls GETGEOMETRY. (What about Syquest 
  153.     Drives with various capacity?)
  154.     p.s. Works fine with KS2.0/KS3.0
  155.     
  156.        -It might be possible that there are drives which can't
  157.     read/write up to Cyl.81 (I've never seen one).
  158.  
  159.        -It's currently impossible to mount two drives on the same unit.
  160.     
  161.  
  162.  Bonus:
  163.  
  164.     If you use diskspare.device you won't have any problems with
  165.     bootblock-viruses because they try to write single sectors via
  166.     trackdisk.device. Trackdisk can't read the track so it can't
  167.     write single sectors!
  168.     If there should be a virus which is able to write itself to
  169.     the first blocks of a diskspare-disk then this will be it's
  170.     last activity because the device can't be made resident ->
  171.     you can't boot from this disk -> the virus won't be executed!
  172.  
  173.  
  174.  Some details:
  175.  
  176.  1.    Safety:
  177.      I've tested the device since Dec. 1992 on different Amigas
  178.      (A500-A4000) and I've copied (nearly) all my disks to diskspare-
  179.      format. I use the cheapest No-Name-Disks and there weren't any
  180.      problems (yet).
  181.      All updates and enchantments made, concerning the 
  182.      device-routines and not the track-construction.
  183.      
  184.      The only problem could be the floppy-drive. There're so many
  185.      different types (I've got 6 drives of 4 different manufacturers)
  186.      that it might be possible that one of them doesn't work.
  187.      
  188.  2.    Speed:
  189.     Diskspare.device is about 5%-15% faster than the trackdisk.device
  190.     (68000 5%, 68020 10%, 68030 15%)
  191.     example:    (A2000 with A2630/25MHz/2Meg)
  192.             kB    sec        speed
  193.     
  194.     format        984    81    ->    12.1 kB/s (it's true!)
  195.             880    83    ->    10.6 kB/s                    
  196.          
  197.  4.    Mountlist:
  198.         
  199.     Flags = 0    ->    Diskchange works only on DSX:.    (X= 0-3)                    
  200.                 (you have to do a diskchange for DFX by 
  201.                 hand e.g. 'diskchange df0').
  202.     Flags = 1    ->    Diskchange works on DSX: AND DFX:.        
  203.                 (like CrossDOS).
  204.     Flags = 2/3    ->    (Bit 1 set) It's now possible to read/
  205.                 write up to Cyl. 81.
  206.                 You must ALSO change HighCyl to 81 or
  207.                 nothing will happen.
  208.     Flags = 4/5/6/7    ->    (Bit 2 set) Setting this Bit allows
  209.                 the device to use HD-Floppies.    
  210.     ALL other values are reserved.
  211.     
  212.     These flags may be different for each drive.
  213.  
  214.     You may change BlockSize, BlocksPerTrack and Sectors/Block but
  215.     note that a file of even 1 (ONE) Byte length needs 2 blocks
  216.     (FileHeaderBlock & DataBlock). -> if you use big blocks you
  217.     waste A LOT OF disk-space!
  218.     
  219.     BE CAREFUL:
  220.     The entry 'Reserved' MUST BE '2' !!! It cost me a lot of time 
  221.     and nerves because I set it to '0' to get 1K more capacity.
  222.     The only thing I got was curious error-messages! That's 
  223.     obviously a bug in the fastfilesystem.
  224.     
  225.     If you want to waste a lot of speed and capacity you may set
  226.     the 'Buffers < 25' and 'DosType = 0x444f5300'. A good value
  227.     for Buffers is 50 (also for DFx:).
  228.  
  229.  5.    HD-Mode:
  230.     With Bit 2 (Flags in Mountlist) set, the device is enabled to 
  231.     use HD-Drives. It works a little bit differently from the 
  232.     trackdisk.device. Trackdisk allocates and frees the memory 
  233.     for the dmabuffers according to the disk capacity. I don't 
  234.     do so, because if the chipmem is very fragmented or simply 
  235.     not enough of it left, it could be possible that the allocation 
  236.     failed -> No HD-mode possible. So I allocate the buffers when 
  237.     opening the device and keep them until close. -> Make sure the 
  238.     FIRST 'OpenDevice' to a HD-Floppy is made with Bit 2 SET or 
  239.     the HD-Mode won't work!
  240.  
  241.  6.    Copying normal disks to diskspare format:
  242.      You may wish to copy some data from normal (837K) disks to
  243.      diskspare disks (984K) to get some free disks. (You need 8
  244.      d.s. disks for 9 normal disks).     
  245.      The fastest possibility is to mount a RAD: which has the same
  246.      size as a diskspare disk. I've included a sample mountfile
  247.      for 984K (called RDD) and for 1968K (called RHD).
  248.      Now you can copy the files from your normal disks to the RAD
  249.      (RDD or RHD) and then 'diskcopy' it to DSX.
  250.      
  251.     
  252.  IMPORTANT:
  253.     The device is FreeWare. You may use it with your own 
  254.     projects until this doc.file and the Mountlist.files are
  255.     distributed with it. You may also use it for commercial 
  256.     programs if you say CLEARLY that this device is FREEWARE!
  257.     You MUSTN'T modify the device itself or this doc.file or
  258.     the MountList.files. Only exception is a translation of 
  259.     this file. If you need a modified/enchanted version 
  260.     please contact me.
  261.  
  262.     This disk-format MUSTN'T be used for stupid NDOS-Games !!!
  263.  
  264.  MOST IMPORTANT:
  265.     You use the above described software at your OWN RISK.
  266.     
  267.     Under NO CIRCUMSTANCES will the author be liable for any
  268.     direct or indirect damage or data loss resulting from 
  269.     the use or misuse of this software or the documents.
  270.     
  271.     All rights are reserved by the author.
  272.     Suggestions and (detailed) bug-reports are welcome.
  273.  
  274.  Author:
  275.     Klaus Deppisch
  276.     Beckenwengert 3
  277.     97246 Eibelstadt 
  278.         Germany
  279.     
  280.     Phone: 09303 1579
  281.                      
  282.